module Tins::Find::Finder::PathExtension
Attributes
finder[RW]
Public Instance Methods
directory?()
click to toggle source
# File lib/tins/find.rb, line 32 def directory? finder.protect_from_errors { s = finder_stat and s.directory? } end
exist?()
click to toggle source
# File lib/tins/find.rb, line 36 def exist? finder.protect_from_errors { File.exist?(self) } end
file()
click to toggle source
# File lib/tins/find.rb, line 22 def file finder.protect_from_errors do File.new(self) if file? end end
file?()
click to toggle source
# File lib/tins/find.rb, line 28 def file? finder.protect_from_errors { s = finder_stat and s.file? } end
finder_stat()
click to toggle source
# File lib/tins/find.rb, line 16 def finder_stat finder.protect_from_errors do finder.follow_symlinks ? File.stat(self) : File.lstat(self) end end
lstat()
click to toggle source
# File lib/tins/find.rb, line 44 def lstat finder.protect_from_errors { File.lstat(self) } end
pathname()
click to toggle source
# File lib/tins/find.rb, line 48 def pathname Pathname.new(self) end
stat()
click to toggle source
# File lib/tins/find.rb, line 40 def stat finder.protect_from_errors { File.stat(self) } end
suffix()
click to toggle source
# File lib/tins/find.rb, line 52 def suffix pathname.extname[1..-1] || '' end